/*
 * Copyright 2009-2010 the original author or authors.
 *
 * Licensed under the Apache license, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.internna.iwebjtracker.activity.model;

import org.internna.iwebmvc.model.DomainEntity;

/**
 * Any kind of activity performed by a user that must be tracked.
 *
 * @author Jose Noheda
 * @since 1.0
 */
public interface RecordedActivity extends DomainEntity {

    /**
     * Different activities that the application controls. Each activity includes a priority level
     * being 1 the most important and 5 the least.
     */
    enum ActivityType {
        COMPONENT_CREATION(1), ISSUE_ATTACHMENT(4), ISSUE_CLOSE(3), ISSUE_COMMENT(4), ISSUE_CREATION(3), ISSUE_LINK(3), ISSUE_VOTE(5), ISSUE_WATCH(5), JOIN_PROJECT(5), MILESTONE_CREATION(2), MODULE_CREATION(1), PROJECT_CLOSE(1), PROJECT_CREATION(1), PROJECT_OPEN(1), PROJECT_NEW_MEMBER(2), VERSION_CLOSE(2), VERSION_CREATION(2);

        private int value;

        private ActivityType(int value) {
            this.value = value;
        }

        /**
         * Accessor method
         */
        public int getPriority() {
            return value;
        }

    }

}
